
Partial Class Blogs_AddPost
    Inherits System.Web.UI.Page

    Protected Sub Add_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Add.Click
        ClubStarterKit.Data.BlogPosts.Insert(txtTitle.Text.ToString(), txtEntry.Value.ToString(), DateTime.Now(), Membership.GetUser().ProviderUserKey())
        Response.Redirect("~/blogs/default.aspx")
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If User.IsInRole("Blogger") = False Then
            Response.Redirect("~/blogs/default.aspx")
        End If
        Session("FCKeditor:UserFilesPath") = Request.ApplicationPath.ToString & "Files/"
    End Sub
End Class
